<script>
  function recursion(n) {
    if (n < 0) {
      return '输入的数字不能小于0';
    } else if (n == 0) {
      return 0;
    } else if (n == 1) {
      return 1;
    } else if (n > 1) {
      return recursion(n - 1) + recursion(n - 2);
    }
  }
  console.log(recursion(10));
</script>
<p>
  <a href="file:///C:/Users/rise/Desktop/%E9%A6%96%E9%A1%B5/default/04.html">返回</a>
</p>